A=[2 -1 0; -3 5 7];
A(2,:)=A(2,:)-A(2,1)/A(1,1)*A(1,:);
A(1,:)=A(1,:)-A(1,2)/A(2,2)*A(2,:);
A(1,:)=A(1,:)/A(1,1);
A(2,:)=A(2,:)/A(2,2);
A